
// 引入 vue-router 提供的s ts 类型
import type { RouteRecordRaw } from "vue-router";
/*
 * @Author: 凉月 1931226988@qq.com
 * @Date: 2023-08-22 10:14:33
 * @LastEditors: 凉月 1931226988@qq.com
 * @LastEditTime: 2023-08-24 10:18:30
 * @FilePath: \v3_xmly\src\router\routes.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
// 引入 vue-router 提供的 ts 类型
import type { RouteRecordRaw } from "vue-router";

/**
 * 静态路由（默认路由）
 */
export const staticRoutes: Array<RouteRecordRaw> = [
    {
        path: "/home",
        name: "Home",
        component: () => import("@/views/home/index.vue"),
    },
    {
        path: "/rank",
        name: "Rank",
        component: () => import("@/views/rank/index.vue"),
    },
    {
        path: "/category/",
        name: "Category",
        component: () => import("@/views/category/index.vue"),
    },
    {
        path: "/category-list/:flag?",
        name: "Category-list",
        component: () => import("@/views/category/category-List/index.vue"),
    },
    {
        path: "/listen",
        name: "Listen",
        component: () => import("@/views/listen/index.vue"),
    },
    {
        path: "/xmlogin",
        name: "Login",
        component: () => import("@/views/login/index.vue"),
    },
    {
        path: "/search",
        name: "Search",
        component: () => import("@/views/search/index.vue"),
    },
    {
        path: "/search-list",
        name: "Search-list",
        component: () => import("@/views/search/search-List/index.vue"),
    },
    {
        path: "/detail/:id",
        name: "Detail",
        component: () => import("@/views/detail/index.vue"),
    },
    {
        path: "/",
        redirect: "/home",
    },
    // 将匹配所有内容并将其放在 `$route.params.pathMatch` 下
    {
        path: "/:pathMatch(.*)*",
        name: "NotFound",
        component: () => import("@/views/error/404.vue")
    },
];